import request from '@/utils/request'

// 查询实验室预约列表
export function listReservation(query) {
  return request({
    url: '/labdata/reservation/list',
    method: 'get',
    params: query
  })
}
export function listReservationBackList(query) {
  return request({
    url: '/labdata/reservation/blacklist',
    method: 'get',
    params: query
  })
}
// 查询实验室预约详细
export function getReservation(instanceId) {
  return request({
    url: '/labdata/reservation/' + instanceId,
    method: 'get'
  })
}

// 新增实验室预约
export function addReservation(data) {
  return request({
    url: '/labdata/reservation',
    method: 'post',
    data: data
  })
}

// 修改实验室预约
export function updateReservation(data) {
  return request({
    url: '/labdata/reservation',
    method: 'put',
    data: data
  })
}

// 删除实验室预约
export function delReservation(instanceId) {
  return request({
    url: '/labdata/reservation/' + instanceId,
    method: 'delete'
  })
}

// 导出实验室预约
export function exportReservation(query) {
  return request({
    url: '/labdata/reservation/export',
    method: 'get',
    params: query
  })
}

// 实验室预约流程提交
export function commitReservation(data) {
  return request({
    url: '/labdata/reservation/commit',
    method: 'post',
    data: data
  })
}
